package redis

import (
	"we-account-api/config"

	"github.com/go-redis/redis/v8"
)

var Client *redis.Client

func Init() error {
	conf := config.GlobalConfig.Redis
	Client = redis.NewClient(&redis.Options{
		Addr:     conf.Host + ":" + conf.Port,
		Password: conf.Password,
		DB:       conf.DB,
	})

	return nil
}
